﻿<%@ Page Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="PurchaseAudit.aspx.cs" Inherits="PurchaseAudit" Title="Untitled Page" %>
<%@ Register Src="GoodItems.ascx" TagName="GoodItems" TagPrefix="uc1" %>
<%@ Register src="../Controls/TipMessage/TipMessage.ascx" tagname="TipMessage" tagprefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<uc1:TipMessage ID="tipMessage1" runat="server" Style="width:95%;"/>
<asp:Panel ID="pnlGrid" runat="server" CssClass="centerPanel" Width="95%">
<div class="searchDiv" >
           <table cellspacing="0" class="searchTable">
            <tr>
                <td>
                采购单编号：
                </td>
                <td>
                <asp:TextBox ID="S_PurchaseOrderCode" runat="server" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                采购日期：
                </td>
                <td>
                <asp:TextBox ID="S_PurchaseDate" runat="server" onfocus="calendar.ShowCaltable(this, event);" CssClass="smallInput" MaxLength="64" ></asp:TextBox>
                </td>
                <td>
                采购类型：
                </td>
                <td>
                <div class="select"><div><ofcc:DropDownList ID="S_PurchaseType" runat="server"></ofcc:DropDownList></div></div>
                </td>
                <td>
                    &nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text=" 查询 "  CssClass="searchButton" />
                </td>
            </tr>
            </table>
     </div>
<div class="webPanelBorder" >
    <div class="webPanelCaption">采购管理</div>
    <div class="webPanelContent">
        <ofcc:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
            onsplitpageindexchange="gridView_SplitPageIndexChange" 
            OnRowDataBound="gridView_RowDataBound" SplitPageIndex="1" 
            SplitPageStyle="Simple" >
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input ID="PurchaseOrderID" checked="checked" name="PurchaseOrderID" type="radio" 
                            value='<%#DataBinder.Eval(Container.DataItem,"PurchaseOrderID")%>' />
                        <asp:HiddenField ID = "HiddenField2" runat="server" Value='<%#Eval("PurchaseOrderID") %>' />
                    </ItemTemplate>
                    <HeaderStyle Width="40px" />
                </asp:TemplateField>
                <asp:HyperLinkField DataTextField="PurchaseOrderCode" HeaderText="采购单编号" NavigateUrl="#"/> 
                <asp:BoundField DataField="PurchaseDate" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="False" HeaderText="采购日期" HtmlEncodeFormatString="False" />
                <asp:BoundField DataField="PurchaseTypeName" HeaderText="采购类型" />
                <asp:BoundField DataField="SupplierID" HeaderText="供应商" />
                <asp:BoundField DataField="UserName" HeaderText="经办人" />
                <asp:BoundField DataField="OrgName" HeaderText="经办部门" /> 
                <asp:BoundField DataField="Status" HeaderText="当前状态" /> 
            </Columns>
        </ofcc:GridView>
     </div>
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnAudit" runat="server"  ConfirmMessage="确定要审核吗?" OnClick="btnAudit_Click" CssClass="linkButton" >审核</ofcc:LinkButton>
</div> 
</asp:Panel> 

    
<asp:Panel ID="pnlEdit" runat="server" Width="95%" Visible="false" CssClass="centerPanel">
    <div class="webPanelBorder" >
        <div class="webPanelCaption">采购单信息</div>
        <div class="webPanelContent">
             <table cellspacing="1" class="table">
                <tr>
                    <td class="tableSubjectWidth">采购日期：
                    </td>
                    <td><asp:TextBox ID="P_PurchaseDate" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField1" runat="server" />
                    </td>
                    <td class="tableSubjectWidth">期望到货日期：
                    </td>
                    <td><asp:TextBox ID="P_PurchaseHopeDate" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                        <ofcc:RequiredField ID="RequiredField3" runat="server" />
                    </td>
                </tr>
                <tr> 
                    <td>采购类型：
                    </td>
                    <td><div class="select"><div><ofcc:DropDownList ID="P_PurchaseType" runat="server" CssClass="smallInput"></ofcc:DropDownList>
                        </div></div><ofcc:RequiredField ID="RequiredField2" runat="server" />
                    </td>
                    <td>供 应 商：
                    </td>
                    <td><asp:TextBox ID="P_SupplierID" runat="server" CssClass="shortInput" MaxLength="64" ></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>采购单来源：</td>
                    <td><div class="select"><div><ofcc:DropDownList ID="P_PurchaseSource" runat="server" CssClass="smallInput"></ofcc:DropDownList>
                        </div></div><ofcc:RequiredField ID="RequiredField4" runat="server" />
                    </td>
                    <td>任务号：</td>
                    <td><asp:TextBox ID="P_TaskNo" ReadOnly="true" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>经 办 人：</td>
                    <td><asp:TextBox ID="P_LoginName" ReadOnly="true" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                    <td>经办部门：</td>
                    <td><asp:TextBox ID="P_Department" ReadOnly="true" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>备    注：</td>
                    <td><asp:TextBox ID="P_Description" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>
                    </td>
                    <td>常用采购单：<ofcc:ToolTip ID="tootiop1" CssClass="tip" runat="server" ToolTip="输入标题后自动保存为常用采购单" /></td>
                    <td>
                    <asp:TextBox ID="P_CommonName" runat="server" CssClass="shortInput" MaxLength="64"></asp:TextBox>(标题)
                    </td>
                </tr> 
                </table>  
        </div>
     </div>    
     <uc1:GoodItems ID="GoodItems" runat="server" Visible="true"/>
    <div class="webPanelButtonArea">
        <ofcc:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click" ConfirmMessage="确定要审核吗？" CssClass="linkButton" ValidationGroup="submit">审核</ofcc:LinkButton>
        <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">返回</ofcc:LinkButton>
    </div>
<asp:HiddenField ID="hfAddOrEdit" runat="server" />
<asp:HiddenField ID="hfPurchaseOrderID" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="P_PurchaseDate"
    Display="None" ErrorMessage="请选择采购日期" ValidationGroup="submit"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="P_PurchaseType"
    Display="None" ErrorMessage="请选择采购类型" ValidationGroup="submit"></asp:RequiredFieldValidator>
</asp:Panel> 
<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />
</asp:Content>

